﻿using System;

namespace HslCommunication.Profinet.AllenBradley
{
	/// <summary>
	/// AB PLC的每个的数据标签情况
	/// </summary>
	// Token: 0x020000B5 RID: 181
	public class AbTagItem
	{
		/// <summary>
		/// 实例ID
		/// </summary>
		// Token: 0x170001F9 RID: 505
		// (get) Token: 0x06000D28 RID: 3368 RVA: 0x0004DD0D File Offset: 0x0004BF0D
		// (set) Token: 0x06000D29 RID: 3369 RVA: 0x0004DD15 File Offset: 0x0004BF15
		public uint InstanceID { get; set; }

		/// <summary>
		/// 名字
		/// </summary>
		// Token: 0x170001FA RID: 506
		// (get) Token: 0x06000D2A RID: 3370 RVA: 0x0004DD1E File Offset: 0x0004BF1E
		// (set) Token: 0x06000D2B RID: 3371 RVA: 0x0004DD26 File Offset: 0x0004BF26
		public string Name { get; set; }

		/// <summary>
		/// TAG类型（有时候可作为实例ID使用）
		/// </summary>
		// Token: 0x170001FB RID: 507
		// (get) Token: 0x06000D2C RID: 3372 RVA: 0x0004DD2F File Offset: 0x0004BF2F
		// (set) Token: 0x06000D2D RID: 3373 RVA: 0x0004DD38 File Offset: 0x0004BF38
		public ushort SymbolType
		{
			get
			{
				return this.symbolType;
			}
			set
			{
				this.symbolType = value;
				this.ArrayDimension = (((this.symbolType & 16384) == 16384) ? 2 : (((this.symbolType & 8192) == 8192) ? 1 : 0));
				this.IsStruct = ((this.symbolType & 32768) == 32768);
			}
		}

		/// <summary>
		/// 数据的维度信息，默认是0，标量数据，1代表1为数组
		/// </summary>
		// Token: 0x170001FC RID: 508
		// (get) Token: 0x06000D2E RID: 3374 RVA: 0x0004DD9B File Offset: 0x0004BF9B
		// (set) Token: 0x06000D2F RID: 3375 RVA: 0x0004DDA3 File Offset: 0x0004BFA3
		public int ArrayDimension { get; set; }

		/// <summary>
		/// 是否结构体数据
		/// </summary>
		// Token: 0x170001FD RID: 509
		// (get) Token: 0x06000D30 RID: 3376 RVA: 0x0004DDAC File Offset: 0x0004BFAC
		// (set) Token: 0x06000D31 RID: 3377 RVA: 0x0004DDB4 File Offset: 0x0004BFB4
		public bool IsStruct { get; set; }

		// Token: 0x0400038A RID: 906
		private ushort symbolType = 0;
	}
}
